home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility2 / wine02bx.zip / LISP / COMINT / GDB.ELC < prev    next >
Text File  |  1993-03-28  |  9KB  |  98 lines

  1. ;;; compiled by jwz@thalidomide on Sun Aug  2 15:25:39 1992
  2. ;;; from file /u/jwz/emacs19/lisp/comint/gdb.el
  3. ;;; emacs version 19.2.5 Lucid.
  4. ;;; bytecomp version 2.07; 15-jul-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (byte-code "└┴!ê└┬!ç" [require comint shell] 2)
  14. (defvar gdb-prompt-pattern "^(.*gdb[+]?) *" "\
  15. A regexp to recognize the prompt for gdb or gdb+.")
  16. (defvar gdb-mode-map nil "\
  17. Keymap for gdb-mode.")
  18. (byte-code "¼£┴\n!├─┼#ê├╞╟#ê├╚╔#ê├╩╦#ê├ ═╬#ê├ ╧╨#ê╤╥Mç" [gdb-mode-map copy-keymap comint-mode-map define-key " " gdb-refresh "" gdb-control-c-subjob "    " comint-dynamic-complete "┐" comint-dynamic-list-completions ctl-x-map " " gdb-break "&" send-gdb-command def-gdb (macro . #[(name key &optional doc) "└┴┬ \"!┼╞┴╟ ╚F F    ╩╦ ╠«ü╬╧╨    D»¡ê╥╙╘ DFE*ç" [intern format "gdb-%s" name fun if (not (= 1 arg)) "%s %s" arg cstr progn defun (arg) doc "" (interactive "p") gdb-call key define-key gdb-mode-map quote] 8])] 4)
  19. (fset 'gdb-step #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "step"] 5 "\
  20. Step one source line with display" "p"])
  21. (define-key gdb-mode-map "≤" 'gdb-step)
  22. (fset 'gdb-stepi #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "stepi"] 5 "\
  23. Step one instruction with display" "p"])
  24. (define-key gdb-mode-map "Θ" 'gdb-stepi)
  25. (fset 'gdb-finish #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "finish"] 5 "\
  26. Finish executing current function" "p"])
  27. (define-key gdb-mode-map "" 'gdb-finish)
  28. (fset 'gdb-next #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "next"] 5 "\
  29. Step one source line (skip functions)" "p"])
  30. (fset 'gdb-cont #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "cont"] 5 "\
  31. Proceed with the program" "p"])
  32. (fset 'gdb-up #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "up"] 5 "\
  33. Go up N stack frames (numeric arg) with display" "p"])
  34. (define-key gdb-mode-map "<" 'gdb-up)
  35. (fset 'gdb-down #[(arg) "└    ┬U¼ç├─┼    #¬ü┼!ç" [gdb-call arg 1 format "%s %s" "down"] 5 "\
  36. Go down N stack frames (numeric arg) with display" "p"])
  37. (define-key gdb-mode-map ">" 'gdb-down)
  38. (fset 'gdb-mode #[nil "└ ê┴\n!ê├ !ê┼╞╟\"ê╚    ╚\n╚ ╠╬╥╞╘!ê╥╒╫╪!ç" [comint-mode use-local-map gdb-mode-map set-syntax-table c-mode-syntax-table mapcar make-local-variable (gdb-last-frame-displayed-p gdb-last-frame gdb-delete-prompt-marker gdb-filter-accumulator) nil gdb-last-frame gdb-delete-prompt-marker gdb-filter-accumulator gdb-mode major-mode "Inferior GDB" mode-name gdb-prompt-pattern comint-prompt-regexp t gdb-last-frame-displayed-p shell-dirtrackp shell-directory-tracker comint-input-sentinel run-hooks gdb-mode-hook] 3 "\
  39. Major mode for interacting with an inferior Gdb process.
  40. The following commands are available:
  41.  
  42. \\{gdb-mode-map}
  43.  
  44. \\[gdb-display-frame] displays in the other window
  45. the last line referred to in the gdb buffer.
  46.  
  47. \\[gdb-step],\\[gdb-next], and \\[gdb-nexti] in the gdb window,
  48. call gdb to step,next or nexti and then update the other window
  49. with the current file and position.
  50.  
  51. If you are in a source file, you may select a point to break
  52. at, by doing \\[gdb-break].
  53.  
  54. Commands:
  55. Many commands are inherited from comint mode. 
  56. Additionally we have:
  57.  
  58. \\[gdb-display-frame] display frames file in other window
  59. \\[gdb-step] advance one line in program
  60. \\[send-gdb-command] used for special printing of an arg at the current point.
  61. C-x SPACE sets break point at current line." nil])
  62. (byte-code "└┴!¼é┬┬ç" [boundp current-gdb-buffer nil] 2)
  63. (defvar gdb-command-name "gdb" "\
  64. Pathname for executing gdb.")
  65. (fset 'gdb #[(path) "└    !┬    !─┼ ╞Q!ê╟    !n¼â╔ ê╩╦▒ê╠═ P╬!╨╤╥ &ê╙ ê╘╒p!╓\"ê╫╒p!╪\"ê┘ )ç" [expand-file-name path file-name-nondirectory file switch-to-buffer "*gdb-" "*" file-name-directory default-directory newline "Current directory is " "\n" make-comint "gdb-" substitute-in-file-name gdb-command-name nil "-fullname" "-cd" gdb-mode set-process-filter get-buffer-process gdb-filter set-process-sentinel gdb-sentinel gdb-set-buffer] 8 "\
  66. Run gdb on program FILE in buffer *gdb-FILE*.
  67. The directory containing FILE becomes the initial working directory
  68. and source-file directory for GDB.  If you wish to change this, use
  69. the GDB commands `cd DIR' and `directory'." "fRun gdb on file: "])
  70. (byte-code "└┴Mê┬├Mê─┼Mê╞╟Mê╚╔Mê╩╦Mç" [gdb-set-buffer #[nil "┴=¡âpëç" [major-mode gdb-mode current-gdb-buffer] 2] gdb-filter #[(proc string) "└\n½ê├ \nP\"¬ä╞ \")ç" [t inhibit-quit gdb-filter-accumulator gdb-filter-accumulate-marker proc string gdb-filter-scan-input] 4] gdb-filter-accumulate-marker #[(proc string) "└\nG├V½╒\n├H─U½┐┼╞\n\"ë½▒┼╚\n╔#\n┼╚\n\nT# \n╔\nO╠\n\nT O!B*└╧\nT└O\"¬â\në)ç╤╥\"ê╧\n├└O\"ç\nëç" [nil gdb-filter-accumulator string 1 26 string-match "\n" end ":" 2 first-colon second-colon string-to-int gdb-last-frame gdb-last-frame-displayed-p gdb-filter-scan-input proc gdb-filter-insert ""] 6] gdb-filter-scan-input #[(proc string) "┴ܽä┬ëç─┼\"ë½ò╟╔O\"ê╩┬O\"¬à╟\")ç" [string "" nil gdb-filter-accumulator string-match "" start gdb-filter-insert proc 0 gdb-filter-accumulate-marker] 6] gdb-filter-insert #[(proc string) "`└    !U`└    !Wp┬╟    !qê╚Äè└    !bê`╔\n!ê└    !`┬ôê╦ ê╠«ä═p!?╬\"ê*¡ä└    !b,ç" [process-mark proc nil start old-buffer output-after-point moving process-buffer ((set-buffer old-buffer)) insert-before-markers string gdb-maybe-delete-prompt gdb-display-frame get-buffer-window t] 4] gdb-sentinel #[(proc msg) "└┴\n!!¼ç├┼\n├\"ç╞\n!╟>¡║├╚╔╞\n!!P\np ╠Ä┴\n!qê═╬ !êm½ï╧╤▒ê¬Äèdbê╧╤▒ê)╙\n!*ç" [buffer-name process-buffer proc nil overlay-arrow-position set-process-buffer process-status (signal exit) ": " symbol-name mode-line-process obuf ((set-buffer obuf)) set-buffer-modified-p buffer-modified-p 10 mode-name " " msg delete-process] 4]] 2)
  71. (fset 'gdb-refresh #[(&optional arg) "└    !ê┬ ç" [recenter arg gdb-display-frame] 2 "\
  72. Fix up a possibly garbled display, and redraw the arrow." "P"])
  73. (fset 'gdb-display-frame #[(&optional nodisplay noauto) "└ ê    ¡ò\n?¡æ ½ä ?¡è┼    @    A\"ê╞ëç" [gdb-set-buffer gdb-last-frame nodisplay gdb-last-frame-displayed-p noauto gdb-display-line t] 3 "\
  74. Find, obey and delete the last filename-and-line marker from GDB.
  75. The marker looks like \\032\\032FILENAME:LINE:CHARPOS\\n.
  76. Obeying it means displaying in another window the specified file and line." nil])
  77. (fset 'gdb-display-line #[(true-file line) "└    !├\n─\"╞è\nqêî~ê╚    !ê`╩  ¼ä═   `pôê)eW¼ådV½å~êbê)╬ \"+ç" [find-file-noselect true-file buffer display-buffer t window nil pos goto-line line "=>" overlay-arrow-string overlay-arrow-position make-marker set-window-point] 3])
  78. (fset 'gdb-call #[(command) "dbêè└┴\n!!bê`─yê` U?¡ë┼  `Z` {E*╟ ê╚┴\n!    ╩P\"ç" [process-mark get-buffer-process current-gdb-buffer pt 0 point-marker gdb-delete-prompt-marker gdb-set-buffer send-string command "\n"] 4 "\
  79. Invoke gdb COMMAND displaying source in other window." nil])
  80. (fset 'gdb-maybe-delete-prompt #[nil "¡╗┴8A@@\n\\bê`\n\\dX½æ ``\n\\{ÿ½ê``\n\\|ê¬h`─┼!!U?¡ë@╟ëôê╟ë*ç" [gdb-delete-prompt-marker 2 length prompt process-mark get-buffer-process current-gdb-buffer nil] 4])
  81. (fset 'gdb-break #[(temp) "└    !î~ê┬yê├─`\"T)╟╚    !\n½â╦¬ü╠═╬░\"*ç" [file-name-nondirectory buffer-file-name 0 count-lines 1 line file-name send-string get-buffer-process current-gdb-buffer temp "tbreak " "break " ":" "\n"] 7 "\
  82. Set GDB breakpoint at this source line.  With ARG set temporary breakpoint." "P"])
  83. (fset 'gdb-read-address #[nil "è`└ë─┼ ╞Z╟#¡ü`ë½Å╚uê\n╔╩!ê╦uê`{¬û╠═!ê╬uê`╬uê╔═!ê╦uê    `{,ç" [nil begin found pt search-backward "0x" 7 t 2 re-search-forward "[^0-9a-f]" -1 re-search-backward "[^0-9]" 1] 5 "\
  84. Return a string containing the core-address found in the buffer at point."])
  85. (defvar gdb-commands nil "\
  86. List of strings or functions used by send-gdb-command.
  87. It is for customization by you.")
  88. (fset 'send-gdb-command #[(arg) "└ë ½ä 8┼ p=½ä╟`!ê\n½É\n;½å╚\n    \"¬â\n    !¬é    ╔!êdbê╩\n!*ç" [nil addr comm arg gdb-commands gdb-read-address current-gdb-buffer set-mark format switch-to-buffer insert-string] 3 "\
  89. This command reads the number where the cursor is positioned.  It
  90.  then inserts this ADDR at the end of the gdb buffer.  A numeric arg
  91.  selects the ARG'th member COMMAND of the list gdb-print-command.  If
  92.  COMMAND is a string, (format COMMAND ADDR) is inserted, otherwise
  93.  (funcall COMMAND ADDR) is inserted.  eg. \"p (rtx)%s->fld[0].rtint\"
  94.  is a possible string to be a member of gdb-commands.  " "P"])
  95. (fset 'gdb-control-c-subjob #[nil "└┴p!┬\"ç" [process-send-string get-buffer-process ""] 3 "\
  96. Send a Control-C to the subprocess." nil])
  97. (provide 'gdb)
  98.